<?php
include_once '../../Core/Conexion.php';
include_once '../../Core/ControladorSet.php';
include_once '../../Core/InterfazDatos.php';
include_once '../../Entidades/Rubro.php';
include_once '../../Entidades/Alumno.php';
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of nuevo
 *
 * @author home
 */
class nuevo extends ControladorSet
{
    function __construct($pagina) {
        parent::__construct($pagina);
    }

        
    public function buscarValores() {
        $tabla="";
        $rubro=new Rubro("","","","","","","");
        $consulta=$this->conexion->consultaTabla($rubro);
        $fila=mysql_fetch_array($consulta);
        
        do
        {
          
          $tabla=$tabla."<option value= '".$fila[0]."'>".$fila[4]."</option>";
          
        }while($fila=mysql_fetch_array($consulta));
        $this->diccionario['listaRubro']=$tabla;
        
        //para buscar los alumnos
        $tabla="";
        $rubro=new Alumno("","","","","","","","","","","","","");
        $consulta=$this->conexion->consultaTabla($rubro);
        $fila=mysql_fetch_array($consulta);
        
        do
        {
          
          $tabla=$tabla."<option value= '".$fila[0]."'>".$fila[0]."</option>";
          
        }while($fila=mysql_fetch_array($consulta));
        $this->diccionario['listaAlumno']=$tabla;
        
    }

    public function setDiccionario() {
        $this->diccionario=array(
            "listaRubro"=>"",
            "listaAlumno"=>"",
            
        );
    }    
}
$controlador=new nuevo('nuevo.html');
$controlador->rederizarPagina();

?>
